package main

import "fmt"

type Person struct {
	Name    string
	age     int32
	friends []*Person
}

func main() {
	zoro := Person{
		Name: "zoro",
		age:  10,
	}
	luffy := Person{
		Name: "luffy",
		age:  18,
		friends: []*Person{
			&zoro,
		},
	}
	allen := Person{
		Name: "allen",
		age:  19,
		friends: []*Person{
			&luffy,
			&zoro,
		},
	}

	persons := map[string]Person{
		"allen": allen,
		"luffy": luffy,
		"zoro":  zoro,
	}

	buf, err := Parse(persons)
	if err != nil {
		fmt.Printf("%v\n", err)
		return
	}
	fmt.Printf("%v\n", string(buf))
}
